<template>
  <div class="header">
    <div class="left">
      <van-icon v-if="loginFlag" name="cross" @click="logout" />
    </div>
    <div class="right"></div>
    <div class="title" v-if="sousuoFlag">
      <span v-if="loginFlag">{{title}}</span>
      <input type="text" />
      <span class="sousuo">
        <i class="toutiao iconsousuo"></i>
        <span class="ss">搜索</span>
      </span>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: "",
    },
    loginFlag: {
      type: Boolean,
      default: true,
    },
    sousuoFlag: {
      type: Boolean,
      default: true,
    },
  },
  data() {
    return {};
  },
  methods: {
    logout() {
      this.$router.push("/weidenglu");
    },
  },
};
</script>
<style lang="less" scoped>
.header {
  position: relative;
  height: 110px;
  background-color: #3296fa;
  line-height: 110px;
  padding: 0 20px;
  .left {
    float: left;
    color: #fff;
    font-size: 40px;
  }
  .right {
    float: right;
  }
  .title {
    color: #fff;
    font-size: 40px;
    text-align: center;
    input[type="text"] {
      width: 510px;
      height: 70px;
      background-color: #fff;
      opacity: 0.1;
      border: 0;
      border-radius: 26.64rem 0 0 26.64rem;
    }
    .sousuo {
      position: absolute;
      left: 50%;
      top: 2px;
      font-size: 29px;
      .ss {
        margin-left: 5px;
      }
    }
  }
}
</style>